package com.xiudoua.micro.study.service.impl;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xiudoua.micro.study.dao.IFragmentDao;
import com.xiudoua.micro.study.entity.FragmentEntity;
import com.xiudoua.micro.study.service.IFragmentService;

/**
 * @author JustFresh
 * @desc
 * @time 2021年2月23日 下午5:03:32
 */

@Service
public class FragmentServiceImpl implements IFragmentService {
    private static final Logger logger = LoggerFactory.getLogger(IFragmentService.class);

    @Autowired
    private IFragmentDao fragmentDao;

    @Override
    public int saveAll(List<FragmentEntity> paramList) {
        List<FragmentEntity> resList = fragmentDao.saveAll(paramList);
        if (resList != null) {
            return resList.size();
        }
        return 0;
    }

    @Override
    public void deleteAll() {
        fragmentDao.deleteAll();
    }

    @Override
    public FragmentEntity findByIdIn(Long id) {
        return fragmentDao.findByIdIn(id);
    }

    @Override
    public List<FragmentEntity> findEffectiveList() {
        return fragmentDao.findEffectiveList();
    }

}